package com.ttg.common.sftp;

public enum FtpTypeEnum {

    FTP("FTP"),

    SFTP("SFTP");
    private String code;

    FtpTypeEnum(String code) {
        this.code = code;
    }

    public static FtpTypeEnum getByCode(String code){
        for (FtpTypeEnum value : FtpTypeEnum.values()) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
